<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>首页</title>
<link href="/css/style.css" rel="stylesheet" type="text/css" />
</head>


<body>

	<div class="place">
	    <span>位置：</span>
	    <ul class="placeul">
	    <li><a href="#">首页</a></li>
	    </ul>
    </div>
    
    <div class="index-status">
    	<dl>
	        <dt class="s02">
	        	<p><img src="images/i08.png"></img></p>
	        	<p class="index-stat-text">订单数</p>
	        </dt>
	        <dd>${stat['orders']!0}</dd>
	        <dd class="f12">今日：${stat['ordersToday']!0}</dd>
		</dl>
	</div>
    <div class="index-status">
    	<dl>
	        <dt class="s04">
	        	<p><img src="images/i05.png"></img></p>
	        	<p class="index-stat-text">订单金额</p>
	        </dt>
	        <dd>${stat['amounts']!0}</dd>
	        <dd class="f12">今日：${stat['amountsToday']!0}</dd>
		</dl>
	</div><div class="index-status">
    	<dl>
	        <dt class="s01">
	        	<p><img src="images/i07.png"></img></p>
	        	<p class="index-stat-text">会员数</p>
	        </dt>
	        <dd>${stat['users']!0}</dd>
	        <dd class="f12">今日：${stat['usersToday']!0}</dd>
		</dl>
	</div>
    <div class="index-status">
    	<dl>
	        <dt class="s03">
	        	<p><img src="images/i04.png"></img></p>
	        	<p class="index-stat-text">商品数</p>
	        </dt>
	        <dd>${stat['wares']!0}</dd>
	        <dd class="f12">今日：${stat['waresToday']!0}</dd>
		</dl>
	</div>
    <div class="clear-all"></div>
    <div class="xline"></div>
    
    <div class="mainindex">
	    <div class="div-two-line">
	    	<div class="formtitle" style="margin-bottom:0px;" style="margin-bottom:0px;"><span>最新订单</span></div>
	    	<table class="tablelist">
		    	<thead>
			    	<tr>
				        <th width="20%">用户名</th>
				        <th width="22%">订单编号</th>
				        <th width="20%">订单金额</th>
				        <th width="14%">状态</th>
				        <th width="24%">下单时间</th>
			        </tr>
		        </thead>
		        <tbody>
		        <#if orders?? && orders?size gt 0>
		  		<#list orders as item>
					<tr>
				        <td>${(item.userName)!"--"}</td>
				        <td><a href="/order/info/view/${item.id}.html">${(item.code)!"--"}</a></td>
				        <td>&yen;${((item.amountTotal)!0)?string('0.00')}</td>
				        <td>${(item.statusName)!"--"}</td>
				        <td><#if item.orderTime?exists>${(item.orderTime)?string("yyyy-MM-dd HH:mm:ss")}<#else>--</#if></td>
			        </tr> 
		  		</#list>
				<#else>
				<tr><td colspan="5" class="table-nodata">暂无数据！</td></tr>
			  	</#if>
		        </tbody>
		    </table>
	    </div>
	    <div class="div-two-line">
	    	<div class="formtitle" style="margin-bottom:0px;"><span>新增会员</span></div>
	    	<table class="tablelist">
		    	<thead>
			    	<tr>
				        <th width="25%">用户名</th>
				        <th width="20%">真实姓名</th>
				        <th width="20%">手机号</th>
				        <th width="25%">注册时间</th>
				        <th width="10%">操作</th>
			        </tr>
		        </thead>
		        <tbody>
		        <#if users?? && orders?size gt 0>
				  		<#list users as item>
							<tr>
						        <td>${(item.username)!"--"}</td>
						        <td>${(item.realname)!"--"}</td>
						        <td>${(item.mobile)!"--"}</td>
						        <td><#if item.createTime?exists>${(item.createTime)?string("yyyy-MM-dd HH:mm:ss")}<#else>--</#if></td>
						        <td>
						        	<a href="/user/info/view/${item.id}.html">查看</a>
						        </td>
					        </tr> 
				  		</#list>
					<#else>
					<tr><td colspan="5" class="table-nodata">暂无数据！</td></tr>
				  	</#if>
		        </tbody>
		    </table>
	    </div>
	    <div style="clear: both; margin:10px 1%">
	    	<div class="formtitle" style="margin-bottom:0px;"><span>新增商品</span></div>
	    	<table class="tablelist">
		    	<thead>
			    	<tr>
				        <th width="5%">ID</th>
				        <th width="7%">商品图</th>
				        <th width="12%">商品名称</th>
				        <th width="15%">商品状态</th>
				        <th width="8%">品牌分类</th>
				        <th width="10%">价格积分</th>
				        <th width="10%">库存数量</th>
				        <th width="18%">生产信息</th>
				        <th width="12%">操作</th>
			        </tr>
		        </thead>
		        <tbody>
		        <#if wares??>
				  		<#list wares as item>
							<tr>
						        <td>${(item.id)!0}</td>
						        <td><a href="/ware/info/view/${item.id}.html"><img src="${(item.imageMain)!"/images/no_pic.png"}" width="70px"></img></a></td>
						        <td id="ware_name_${(item.id)!0}">
						       	 	<p><a href="/ware/info/view/${item.id}.html">${(item.name)!""}</a></p>
						        	<p>货号：${(item.code)!"--"}</p>
						        	<p>条码：${(item.barcode)!"--"}</p>
						        </td>
						        <td>
						        	<p>
						        	<i id="ware_status_${(item.id)!0}" style="font-size:14px; font-weight: bolder;">
						        	<#if ((item.status)!1)?number = 1>草稿<#elseif ((item.status)!1)?number == 2>下架<#elseif ((item.status)!1)?number == 3>在售<#elseif ((item.status)!1)?number == 4>已删除</#if>
						        	</i></p>
						        	<#if item.lastShelfTime??>
						        	<p>最后上/下架时间：</p>
						        	<p>
						        	<i id="ware_shelfTime_${(item.id)!0}">
						        	${(item.lastShelfTime)?datetime}
						        	</i>
						        	</#if></p>
						        </td>
						        <td>
						        	<p>分类：${(item.categoryName)!"--"}</p>
						        	<p>品牌：${(item.brandName)!"--"}</p>
						        </td>
						        <td>
						        	<p>优惠价：<i id="ware_pricePromotional_${(item.id)!0}">${(item.pricePromotional)!"--"}</i>&ensp;元</p>
						        	<p>积&emsp;分：<i id="ware_score_${(item.id)!0}">${(item.score)!"--"}</i>&ensp;分</p>
						        	<p>市场价：<i id="ware_priceOriginal_${(item.id)!0}">${(item.priceOriginal)!"--"}</i>&ensp;元</p>
						        </td>
						        <td>
							        <p>库存：<i id="ware_number_${(item.id)!0}">${(item.numberInventory)!0}</i>&ensp;${(item.unitName)!"--"}</p>
						        	<p>规格：${(item.specifications)!"--"}</p>
						        </td>
						        <td>
						        	<p>生产日期：<#if item.dateManufacture??>${(item.dateManufacture)?date}<#else>--</#if></p>
						        	<p>保&ensp;质&ensp;期：${(item.shelfLife)!"--"}</p>
						        	<p>生产厂家：${(item.manufacturer)!"--"}</p>
						        </td>
						        <td>
						        	<p><a href="/ware/info/view/${item.id}.html">查看</a></p>
							       	<p><a href="/ware/info/edit/${item.id}.html">编辑</a></p>
							  		<p><a href="/ware/info/copy/${item.id}.html">复制</a></p>
						        	</p>
						        </td>
					        </tr> 
				  		</#list>
				  	</#if>
		        </tbody>
		    </table>
	    </div>
    </div>
</body>
<script type="text/javascript" src="/js/jquery-1.10.1.min.js"></script>
<script type="text/javascript" >$('.tablelist tbody tr:odd').addClass('odd');</script>
</html>
